<template>
  <div id="app">
    <button @click="toogle1">触发Message</button>
    <button @click="toogle2">触发$message</button>
  </div>
</template>

<script>
import { Message } from './components/co-message/index';

export default {
  name: 'App',
  methods: {
    toogle1() {
      // Message({ message: '我是一条错误消息', duration: 5000, type: 'error', center: true });
      // Message({ message: '我是一条错误消息', duration: 0 });
      // Message({ type: 'success' });
      Message({ message: '我是一条成功消息', duration: 3000, type: 'success', center: false });
    },
    toogle2() {
      // this.$message({ message: '我是一条成功消息', duration: 5000, type: 'success', center: false });
      // this.$message({ message: '我是一条错误消息', duration: 0 });
      // this.$message({ type: 'success' });
      this.$message({ message: '我是一条错误消息', duration: 3000, type: 'error', center: true });
    },
  },
};
</script>

<style>
</style>
